package edu.zju.gis.dldsj.entity;

import edu.zju.gis.dldsj.model.Jsonable;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
public class DataVisit implements Jsonable, Comparable<DataVisit> {
    private Integer id;
    private String dataId;
    private Integer visitCount;
    private Date lastVisitTime;

    @Override
    public String id() {
        return id.toString();
    }

    @Override
    public int compareTo(DataVisit o) {
        return visitCount - o.visitCount;
    }
}